:root {
  --primary: #2563EB;
  --primary-d: #1D4ED8;
  --primary-dd: #0B1A33;
  --glow: #60A5FA;
  --mint: #BFDBFE;
  --warm: #F97316;
  --cream: #EEF3FA;
  --paper: #F8FAFC;
  --ink: #0F172A;
  --muted: #5A6780;
  --disp: "GmarketSansBold", "Jua", "Noto Sans KR", sans-serif;
  --body: "Pretendard", "Noto Sans KR", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
body {
  margin: 0;
  background: var(--cream);
  font-family: var(--body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection {
  background: var(--glow);
  color: var(--primary-dd);
}
@keyframes hmReveal {
  from {
    opacity: 0;
    transform: translateY(42px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes glowpulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.12);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.hm-vis {
  animation: hmReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
  }
}

/* ============================================================
   사용법(guide) 페이지 전용
   ------------------------------------------------------------
   · .hm-shot  = 참고 목업(앱 실제 화면)을 감싸는 래퍼.
     목업은 320px 고정폭 + 내부가 전부 px 고정이라 responsive.css 의
     `#hm-page [style*="width:"]{max-width:100%}` 규칙에 뭉개진다.
     → 아래에서 더 높은 우선순위로 예외 처리한다(선택자에 .hm-shot 추가).
   · 목업 안 텍스트는 앱 UI 캡처이므로 번역하지 않는다(JSP 에서 data-i18n-skip).
   ============================================================ */

/* 목업 내부 고정 크기 보존 — responsive.css(뒤에 로드) 의 max-width:100% 무효화 */
#hm-page .hm-shot,
#hm-page .hm-shot [style*="width:"] {
  max-width: none !important;
}

/* 목업 안쪽 스크롤 영역(참고 파일의 .phone-scroll) 스크롤바 숨김 */
.phone-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.phone-scroll::-webkit-scrollbar {
  display: none;
}

/* ---------- 챕터별 가로 캐러셀 ---------- */
.hm-gcar {
  position: relative;
}
/* 트랙: 가로 스크롤 + 스냅. 스와이프/트랙패드가 그대로 동작한다. */
.hm-gtrack {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* 세로 스크롤은 페이지에 넘겨 주고 가로만 트랙이 가져간다 */
  touch-action: pan-y pinch-zoom;
  overscroll-behavior-x: contain;
  border-radius: 26px;
}
.hm-gtrack::-webkit-scrollbar {
  display: none;
}
/* 슬라이드 하나 = 화면 하나. 항상 트랙 전체 폭. */
.hm-gslide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: 342px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  background: var(--paper);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 26px;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 20px 46px -30px rgba(15, 23, 42, 0.36);
}

.hm-shot {
  display: flex;
  justify-content: center;
}

/* 좌우 화살표 — 트랙 바깥쪽에 겹쳐 놓는다 */
.hm-gprev,
.hm-gnext {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 10px 26px -12px rgba(15, 23, 42, 0.45);
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hm-gprev {
  left: -10px;
}
.hm-gnext {
  right: -10px;
}
.hm-gprev:hover {
  transform: translateY(-50%) scale(1.1);
}
.hm-gnext:hover {
  transform: translateY(-50%) scale(1.1);
}
.hm-gprev:focus-visible,
.hm-gnext:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* 진행바 + 카운터 */
.hm-gnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.hm-gbar {
  width: min(340px, 46vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  overflow: hidden;
}
.hm-gbar span {
  display: block;
  height: 100%;
  width: 3.4%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.hm-gcount {
  font-family: var(--disp);
  font-size: 13px;
  color: var(--muted);
  min-width: 54px;
  text-align: left;
}

/* STEP 탭 — 좁은 화면에서는 가로로 스크롤된다 */
.hm-gtabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  margin-bottom: 14px;
}
.hm-gtabs::-webkit-scrollbar {
  display: none;
}
.hm-gtab {
  all: unset;
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 15px;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}
.hm-gtab b {
  color: var(--primary);
  opacity: 0.75;
}
.hm-gtab:hover {
  color: var(--primary);
  background: rgba(96, 165, 250, 0.16);
}
.hm-gtab.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.hm-gtab.is-on b {
  color: #fff;
  opacity: 0.7;
}
.hm-gtab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* STEP 설명 — 7개를 겹쳐 두고 현재 것만 표시 */
.hm-gleads {
  margin: 0 0 16px;
}
.hm-glead {
  display: none;
  margin: 0;
  max-width: 720px;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.7;
  color: var(--muted);
  word-break: keep-all;
}
.hm-glead.is-on {
  display: block;
}

/* 앵커 이동 시 고정 헤더에 제목이 가리지 않도록 */
.hm-gchapter {
  scroll-margin-top: 96px;
}

/* 요금제 카드 */
.hm-pricegrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.hm-pricecard {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 24px;
  padding: 32px 26px;
  box-shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.3);
  transition: transform 0.5s cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 0.5s;
}
.hm-pricecard:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 56px -26px rgba(37, 99, 235, 0.4);
}
.hm-pricecard.hm-pricefeat {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 26px 54px -26px rgba(37, 99, 235, 0.5);
}
.hm-pricelist {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-pricelist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.hm-pricelist li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--glow);
}

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .hm-pricegrid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .hm-gslide {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 26px;
  }
  .hm-gtext {
    width: 100%;
  }
  /* 화살표를 트랙 위로 들여 놓는다(바깥에 공간이 없음) */
  .hm-gprev {
    left: 2px;
  }
  .hm-gnext {
    right: 2px;
  }
}
/* 좁은 화면: 목업(342px)이 뷰포트를 넘지 않도록 축소.
   zoom 은 레이아웃 크기까지 줄여 주변 여백이 정상 계산된다(미지원 시 무시돼도 카드가 스크롤되지 않도록 아래 overflow 보강). */
@media (max-width: 420px) {
  .hm-shot {
    zoom: 0.86;
  }
  .hm-gslide {
    padding: 18px 10px;
  }
}
@media (max-width: 360px) {
  .hm-shot {
    zoom: 0.78;
  }
}
